//
//  Util.h
//  StarBugs
//
//  Created by ?? ? on 12/22/11.
//  Copyright 2011 antisword@playorca.com. All rights reserved.
//
#ifndef __UTIL_H__
#define __UTIL_H__

#include "cocos2d.h"

namespace   cocos2d {
    class Util
    {
    public:
        static CCRect makeRectWithSprite(CCSprite * mySprite);
        static CCRect makeRectWithLabel(CCLabelTTF* label);
        static CCPoint makePointAboutAnchor(CCSize size, CCPoint anchor);
        static CCRect makeRectWithSpriteWorldSpace(CCSprite *mySprite , CCNode* node);
        static CCPoint centerPointWithSpriteWorldSpace(CCSprite *mySprite , CCNode* node);
        static void makeLineWithSprite(CCSprite *sprite, CCPoint first, CCPoint secont);
//        static void printCurrentTime(int num);
//        static CCPoint rotatePointAboutPoint(CCPoint targetPt, CCPoint anchorPt, float angle);
        
        static float degreeTwoPoint(CCPoint p, CCPoint p2)
        {
            return CC_RADIANS_TO_DEGREES(atanf((p2.x - p.x) / (p2.y - p.y)));
        };

    };
}

#endif
